Skip to content

Consume the pending messages rather than asserting pending message count. #690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

knutroy
Copy link
Contributor

@knutroy knutroy commented May 5, 2025

This fixes flakiness in test_subscribe_push_bound() where the client-side pending message queue occasionally did not contain all the pending messages from the server by the time the test function inspected the queue, due to a race condition between the task fetching messages from the server and the task running the test function.

Resolves #689.

Signed-off-by: Knut Aksel Røysland knutroy@ifi.uio.no

…unt.

This fixes flakiness in test_subscribe_push_bound() where the client-side
pending message queue occasionally did not contain all the pending
messages from the server by the time the test function inspected the
queue, due to a race condition between the task fetching messages from the
server and the task running the test function.

Resolves nats-io#689.

Signed-off-by: Knut Aksel Røysland <knutroy@ifi.uio.no>
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@caspervonb caspervonb merged commit cdb95ec into nats-io:main May 9, 2025
16 checks passed
@knutroy knutroy deleted the fix-flaky-SubscribeTest.test_subscribe_push_bound branch May 13, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky test "SubscribeTest.test_subscribe_push_bound"
2 participants